#ifndef INSERTION_H_H_H
#define INSERTION_H_H_H

#include "Sort.h"

class InsertionSort : public Sort{
public:
	virtual void Iterative(int list[], int n) {}
	virtual void Recursive(int list[], int n) {}

	virtual ~InsertionSort() {}
};

//直接插入排序
class DirectInsertion : public InsertionSort {
public:
	virtual void Iterative(int list[], int n);
	virtual void Recursive(int list[], int n);

	virtual ~DirectInsertion() {}
};

//折半插入排序
class BinaryInsertion : public InsertionSort {
public:
	virtual void Iterative(int list[], int n);
	virtual void Recursive(int list[], int n);

	virtual ~BinaryInsertion() {}
};

//希尔插入排序
class ShellInsertion : public InsertionSort {
public:
	virtual void Iterative(int list[], int n);
	virtual void Recursive(int list[], int n);

	virtual ~ShellInsertion() {}

private:
	void ShellPass(int list[], int n, int d);
};

#endif
